[IA64] ptc_ga might not purge vtlb
authorawilliam@xenbuild2.aw <awilliam@xenbuild2.aw>
Wed, 24 Jan 2007 19:16:44 +0000 (12:16 -0700)
committerawilliam@xenbuild2.aw <awilliam@xenbuild2.aw>
Wed, 24 Jan 2007 19:16:44 +0000 (12:16 -0700)
SMP Windows sometimes failed to boot up with BSOD.

If VTLB hasn't been used in region 0,
ptc_ga for other region doesn't purge VTLBs.

Signed-off-by: Kouya Shimura <kouya@jp.fujitsu.com>
xen/arch/ia64/vmx/vmmu.c
xen/arch/ia64/vmx/vtlb.c
xen/include/asm-ia64/vmmu.h

index 145cd4c4472b8781f5e21f5e95a17df54f7a0a81..d75cc441ca2e6f55cca29af0380f52a926aee884 100644 (file)
@@ -574,7 +574,8 @@ static void ptc_ga_remote_func (void *varg)
     mpta = ia64_get_pta();
     ia64_set_pta(v->arch.arch_vmx.mpta&(~1));
     ia64_srlz_d();
-    vmx_vcpu_ptc_l(v, REGION_OFFSET(vadr), args->ps);
+    vadr = PAGEALIGN(vadr, args->ps);
+    thash_purge_entries_remote(v, vadr, args->ps);
     VMX(v, vrr[0]) = oldrid; 
     VMX(v, psbits[0]) = oldpsbits;
     ia64_set_rr(0x0,moldrid);
index f85c9e63b453b502a85aa7eaa54667246fe92d7c..cb0181b9a0222cc9eb99ed125d2f5618726339cd 100644 (file)
@@ -261,7 +261,7 @@ u64 guest_vhpt_lookup(u64 iha, u64 *pte)
  *  purge software guest tlb
  */
 
-void vtlb_purge(VCPU *v, u64 va, u64 ps)
+static void vtlb_purge(VCPU *v, u64 va, u64 ps)
 {
     thash_data_t *cur;
     u64 start, curadr, size, psbits, tag, rr_ps, num;
@@ -442,6 +442,15 @@ void thash_purge_entries(VCPU *v, u64 va, u64 ps)
     vhpt_purge(v, va, ps);
 }
 
+void thash_purge_entries_remote(VCPU *v, u64 va, u64 ps)
+{
+    u64 old_va = va;
+    va = REGION_OFFSET(va);
+    if (vcpu_quick_region_check(v->arch.tc_regions, old_va))
+        vtlb_purge(v, va, ps);
+    vhpt_purge(v, va, ps);
+}
+
 u64 translate_phy_pte(VCPU *v, u64 *pte, u64 itir, u64 va)
 {
     u64 ps, ps_mask, paddr, maddr;
index 9c436ce0e6dab781177c14d2279374a92a79e151..905d122f68d146f8b253858e2fbf3fbeca2a9caf 100644 (file)
@@ -271,6 +271,7 @@ extern thash_data_t *thash_find_next_overlap(thash_cb_t *hcb);
  *
  */
 extern void thash_purge_entries(struct vcpu *v, u64 va, u64 ps);
+extern void thash_purge_entries_remote(struct vcpu *v, u64 va, u64 ps);
 extern void thash_purge_and_insert(struct vcpu *v, u64 pte, u64 itir, u64 ifa, int type);
 
 /*